package com.langerra.client.channel.rpc;

import java.io.Serializable;
import java.util.ArrayList;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.langerra.shared.channel.ChannelMessage;

@RemoteServiceRelativePath("channel-rpc")
public interface RemoteChannelService
		extends RemoteService {
	<T extends Serializable> ChannelMessage<T> get(
			String channelName, Long key);
	
	<T extends Serializable> ChannelMessage<T> put(
			String channelName, ChannelMessage<T> value);

	<T extends Serializable> ArrayList<ChannelMessage<T>> readAll(
			String channelName);

	<T extends Serializable> Boolean writeAll(
			String channelName, ArrayList<ChannelMessage<T>> messages);
}